<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<pre>
			1.查询计算中中文件大小的单位 B,K,M,T和Unicode编码
			
			2.编写I LOVE YOU 对应的Unicode编码,并反编译过来
		</pre>
		
		<script type="text/javascript">
			
			// 1.查询计算中中文件大小的单位 B,K,M,T和Unicode编码
			
			/* “在计算机中,单位KB、MB、GB、TB都是用来表示数量单位的,它们的关系如下：
			 1KB＝1024字节 1MB＝1024KB 1GB＝1024MB 1TB＝1024GB 1EB=1024TB 
			 
			 1 byte (B) = 8 bits (b) 字节=8个二进制位 
			 1 Kilobyte(K/KB)=2^10 bytes=1,024 bytes 千字节
			 1 Megabyte(M/MB)=2^20 bytes=1,048,576 bytes 兆字节 
			 1 Gigabyte(G/GB)=2^30 bytes=1,073,741,824 bytes 千兆字节 
			 1 Terabyte(T/TB)=2^40 bytes=1,099,511,627,776 bytes吉字节 ” */
			
			var a = "BKMGT"
			var x = a.charCodeAt(0)   // 66
			var x1 = a.charCodeAt(1)  // 75
			var x2 = a.charCodeAt(2)  // 77
			var x3 = a.charCodeAt(3)  // 71
			var x4 = a.charCodeAt(4)  // 84
			
			console.log("x:",x,"x1:",x1,"x2:",x2,"x3:",x3,"x4:",x4)
			
			//2.编写I LOVE YOU 对应的Unicode编码,并反编译过来
			
			var miss = "I LOVE YOU";
			var a1 = miss.charCodeAt(0)
			var a2 = miss.charCodeAt(1)
			var a3 = miss.charCodeAt(2)
			var a4 = miss.charCodeAt(3)
			var a5 = miss.charCodeAt(4)
			var a6 = miss.charCodeAt(5)
			var a7 = miss.charCodeAt(6)
			var a8 = miss.charCodeAt(7)
			var a9 = miss.charCodeAt(8)
			var a0 = miss.charCodeAt(9)
			
			console.log("a1:",a1);  // 73
			console.log("a2:",a2);  // 32
			console.log("a3:",a3);  // 76
			console.log("a4:",a4);  // 79
			console.log("a5:",a5);  // 86
			console.log("a6:",a6);  // 69
			console.log("a7:",a7);  // 32
			console.log("a8:",a8);  // 89
			console.log("a9:",a9);  // 79
			console.log("a0:",a0);  // 85
			
			
		</script>
		
		
		
		
	</body>
</html>
